<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3d</title>
    <style>
        body {
            perspective: 200px;
        }
        .box1 {
            width: 100px;
            height: 100px;
            background-color: darkcyan;
            margin: 0 auto;
            transition: all 1s;
        }
        .box2 {
            width: 100px;
            height: 100px;
            background-color: pink;
            margin: 200px auto;
            transition: all 1s;
        }
        .box1:hover {
            /* transform: translate3d(150px, 300px, 100px); */
            /* transform: rotateZ(360deg); */
            transform: rotate3d(1, 2, 3, 360deg);
        }
        .box2:hover {
            /* transform: translate3d(0, 0, 0); */
            transform: rotate(360deg);
        }
    </style>
</head>
<body>
    <div class="box1"></div>
    <div class="box2"></div>
</body>
</html>